package com.yamanyar.weebill.view;

import java.io.Serializable;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.yamanyar.weebill.domain.Role;
import com.yamanyar.weebill.service.RoleService;

/**
 * List roles. Created in Jun 28, 2008.
 * 
 * @author Kaan Yamanyar
 */
@Component("listRole")
@Scope("request")
public class ListRoles implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3156916209497186641L;
	private List<Role> roles;
	private RoleService roleService;

	@Autowired
	public ListRoles(RoleService roleService) {
		this.roleService = roleService;
		roles = this.roleService.findAll();
	}

	public List<Role> getRoles() {
		return roles;
	}

	public void setRoles(List<Role> roles) {
		this.roles = roles;
	}

}
